Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Adi Molina von Ahn 5 posts 26 karma points
    Jan 06, 2012 @ 14:19
    Adi Molina von Ahn
    0

    Access to the path '..\ExamineIndexes\[AnyIndex]\Index\segments.gen' is denied.

    Hey all, so..

    Summary: Umbraco v4.7.1, access to segments.gen denied for any index whenever examine is running on a separate process.

    Details:

    Examine's LuceneEngine Provider LuceneSearcher contains a method called Search(ISearchCriteria searchParams), which very rarely throw an access denied error when accessing data from the segments.gen file. Now this is not happening because of folder/file permissions.

    Currently, I have my files located on a separate storage area network, using Umbraco 4.7.1 & nightly build (.465).The instance uses Umbraco's normal Examine Indexes (Internal & InternalMember), plus two other custom Examine Indexes.

    I'm not sure if I'm correct, but I believe Examine renames segments.gen file to segments.new as new documents are indexed. This rename breaks the current search that are going on in a different thread. I've seen this error happening on both the custom Examine Indexes we have built, as well as Umbraco's.

    Let's say I want to create a new Dynamic Node(Int32 nodeId). This method will call  Examine.LuceneEngine.Providers.LuceneSearcher.Search(ISearchCriteria searchParams) and then this error will be thrown on the rare occasion that Examine is currently indexing/updating/deleting documents.

    This is a very difficuly bug to replicate, but it does happen from time to time, specifically when multiple editors are on the CMS at the same time. The error will break anything that uses Examine, so the issue is quite relevant.

    Has anyone encountered the same problem?

     

    Here is a full stack trace and error:

    Access to the path '\\san\App_Data\TEMP\ExamineIndexes\Internal\Index\segments.gen' is denied.

    System.UnauthorizedAccessExceptionAccess to the path '\\san\App_Data\TEMP\ExamineIndexes\Internal\Index\segments.gen' is denied.

    System.Exception: Error. ---> System.UnauthorizedAccessException: Access to the path '\\san\App_Data\TEMP\ExamineIndexes\Internal\Index\segments.gen' is denied.
       at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
       at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath)
       at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, String msgPath, Boolean bFromProxy)
       at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share)
       at Lucene.Net.Store.SimpleFSDirectory.SimpleFSIndexInput.Descriptor..ctor(FileInfo file, FileAccess mode)
       at Lucene.Net.Store.SimpleFSDirectory.OpenInput(String name, Int32 bufferSize)
       at Lucene.Net.Index.SegmentInfos.FindSegmentsFile.Run(IndexCommit commit)
       at Lucene.Net.Index.DirectoryReader.IsCurrent()
       at Examine.LuceneEngine.LuceneExtensions.GetReaderStatus(IndexReader reader)
       at Examine.LuceneEngine.Providers.LuceneSearcher.ValidateSearcher(Boolean forceReopen)
       at Examine.LuceneEngine.Providers.LuceneSearcher.Search(ISearchCriteria searchParams)
       at umbraco.MacroEngines.ExamineBackedMedia.GetUmbracoMedia(Int32 id)
       at umbraco.MacroEngines.DynamicBackingItem..ctor(Int32 Id)
       at umbraco.MacroEngines.DynamicNode..ctor(Int32 NodeId)
       --- End of inner exception stack trace ---

     

    The error above happened upon using new umbraco.MacroEngines.DynamicNode(Int32 NodeId)

     

    Thanks in advance!

    Adi

     

  • Adi Molina von Ahn 5 posts 26 karma points
    Jan 06, 2012 @ 14:26
    Adi Molina von Ahn
    0

    This blog also seems to have experienced a similar issue with Lucene.Net during indexing..

    http://stackoverflow.com/questions/271661/lucene-net-access-denied-to-segments

  • Adi Molina von Ahn 5 posts 26 karma points
    Jan 06, 2012 @ 14:30
    Adi Molina von Ahn
    0

    Correction:

    **Summary: Umbraco v4.7.1, access to segments.gen denied for any index whenever Examine indexes as Lucene runs a search

Please Sign in or register to post replies

Write your reply to:

Draft